<template>
  <div class="w-full h-full flex flex-col">
    <a-affix :offset-top="50">
      <a-menu v-if="pathList.includes(selectedKeys[0])" mode="horizontal" :selectedKeys="selectedKeys" type="inner"
        class="bg-[#f0f2f5] mb-2">
        <template v-for="item in routeList">
          <a-menu-item :key="item.path">
            <router-link :to="{ path: item.path }">{{ item.title }}</router-link>
          </a-menu-item>
        </template>
      </a-menu>
    </a-affix>
    <route-view class="flex-1" />
  </div>
</template>

<script>
import menutabs from '@/mixins/menu-mixin'

export default {
  mixins: [menutabs],
  data() {
    return {
      routeList: [
        {
          path: '/user/userManage',
          title: '用户管理',
        },
        {
          path: '/user/doctorManage',
          title: '医生管理',
        },
        {
          path: '/user/assistantManage',
          title: '助理管理 ',
        },
        {
          path: '/user/patientManage',
          title: '患者管理',
        },
      ],
    }
  },
}
</script>
